From: Jim Blandy Date: Tue, 16 Mar 1993 09:13:53 +0000 (+0000) Subject: * calendar.el (calendar-time-zone): Initialize this when X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96849 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=aecd6486720b6d4e316c180841627d57be428f26;p=emacs.git * calendar.el (calendar-time-zone): Initialize this when calendar.el loads, not in the defvar. --- diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 91a0bfd8224..11900f5f7c4 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -477,11 +477,22 @@ For example, -74.0 for New York City.") `calendar-longitude', calendar-latitude'. Default value is just the latitude, longitude pair.") +;;; Since this defvar is marked to go into loaddefs.el, it will be +;;; evaluated when Emacs is dumped. However, this variable's +;;; appropriate value really depends on the conditions under which the +;;; code is invoked; it would be inappropriate to initialize this when +;;; Emacs is dumped. So, we initialize it to nil now, and if it's +;;; still nil when this file is actually loaded, we give it its real value. ;;;###autoload -(defvar calendar-time-zone (car (current-time-zone)) +(defvar calendar-time-zone nil "*Number of minutes difference between local standard time at `calendar-location-name' and Universal (Greenwich) Time. For example, -300 -for New York City, -480 for Los Angeles.") +for New York City, -480 for Los Angeles. +If this is nil, it will be set to the local time zone when the calendar +package loads.") +;;; If the user has given this a real value, don't wipe it out. +(or calendar-time-zone + (setq calendar-time-zone (current-time-zone))) ;;;###autoload (defvar calendar-standard-time-zone-name (car (nthcdr 2 (current-time-zone)))